package com.bdqn.t320.ch12.repository;

import com.bdqn.t320.ch12.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface RoleRepository extends JpaRepository<Role, Long> {

    @Query(value = "select role_name from sys_role where role_id=?1", nativeQuery = true)
    public String getRoleNameByRoleId(Long roleId);
}
